/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.swt.mto.thithu.model;

import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link Result}.
 * </p>
 *
 * @author    tuan.nguyen
 * @see       Result
 * @generated
 */
public class ResultWrapper implements Result, ModelWrapper<Result> {
	public ResultWrapper(Result result) {
		_result = result;
	}

	public Class<?> getModelClass() {
		return Result.class;
	}

	public String getModelClassName() {
		return Result.class.getName();
	}

	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("resultId", getResultId());
		attributes.put("quizId", getQuizId());
		attributes.put("userId", getUserId());
		attributes.put("questionId", getQuestionId());
		attributes.put("userName", getUserName());
		attributes.put("userChoice", getUserChoice());
		attributes.put("correct", getCorrect());
		attributes.put("score", getScore());

		return attributes;
	}

	public void setModelAttributes(Map<String, Object> attributes) {
		Long resultId = (Long)attributes.get("resultId");

		if (resultId != null) {
			setResultId(resultId);
		}

		Long quizId = (Long)attributes.get("quizId");

		if (quizId != null) {
			setQuizId(quizId);
		}

		Long userId = (Long)attributes.get("userId");

		if (userId != null) {
			setUserId(userId);
		}

		Long questionId = (Long)attributes.get("questionId");

		if (questionId != null) {
			setQuestionId(questionId);
		}

		String userName = (String)attributes.get("userName");

		if (userName != null) {
			setUserName(userName);
		}

		String userChoice = (String)attributes.get("userChoice");

		if (userChoice != null) {
			setUserChoice(userChoice);
		}

		String correct = (String)attributes.get("correct");

		if (correct != null) {
			setCorrect(correct);
		}

		Integer score = (Integer)attributes.get("score");

		if (score != null) {
			setScore(score);
		}
	}

	/**
	* Returns the primary key of this result.
	*
	* @return the primary key of this result
	*/
	public long getPrimaryKey() {
		return _result.getPrimaryKey();
	}

	/**
	* Sets the primary key of this result.
	*
	* @param primaryKey the primary key of this result
	*/
	public void setPrimaryKey(long primaryKey) {
		_result.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the result ID of this result.
	*
	* @return the result ID of this result
	*/
	public long getResultId() {
		return _result.getResultId();
	}

	/**
	* Sets the result ID of this result.
	*
	* @param resultId the result ID of this result
	*/
	public void setResultId(long resultId) {
		_result.setResultId(resultId);
	}

	/**
	* Returns the quiz ID of this result.
	*
	* @return the quiz ID of this result
	*/
	public long getQuizId() {
		return _result.getQuizId();
	}

	/**
	* Sets the quiz ID of this result.
	*
	* @param quizId the quiz ID of this result
	*/
	public void setQuizId(long quizId) {
		_result.setQuizId(quizId);
	}

	/**
	* Returns the user ID of this result.
	*
	* @return the user ID of this result
	*/
	public long getUserId() {
		return _result.getUserId();
	}

	/**
	* Sets the user ID of this result.
	*
	* @param userId the user ID of this result
	*/
	public void setUserId(long userId) {
		_result.setUserId(userId);
	}

	/**
	* Returns the user uuid of this result.
	*
	* @return the user uuid of this result
	* @throws SystemException if a system exception occurred
	*/
	public java.lang.String getUserUuid()
		throws com.liferay.portal.kernel.exception.SystemException {
		return _result.getUserUuid();
	}

	/**
	* Sets the user uuid of this result.
	*
	* @param userUuid the user uuid of this result
	*/
	public void setUserUuid(java.lang.String userUuid) {
		_result.setUserUuid(userUuid);
	}

	/**
	* Returns the question ID of this result.
	*
	* @return the question ID of this result
	*/
	public long getQuestionId() {
		return _result.getQuestionId();
	}

	/**
	* Sets the question ID of this result.
	*
	* @param questionId the question ID of this result
	*/
	public void setQuestionId(long questionId) {
		_result.setQuestionId(questionId);
	}

	/**
	* Returns the user name of this result.
	*
	* @return the user name of this result
	*/
	public java.lang.String getUserName() {
		return _result.getUserName();
	}

	/**
	* Sets the user name of this result.
	*
	* @param userName the user name of this result
	*/
	public void setUserName(java.lang.String userName) {
		_result.setUserName(userName);
	}

	/**
	* Returns the user choice of this result.
	*
	* @return the user choice of this result
	*/
	public java.lang.String getUserChoice() {
		return _result.getUserChoice();
	}

	/**
	* Sets the user choice of this result.
	*
	* @param userChoice the user choice of this result
	*/
	public void setUserChoice(java.lang.String userChoice) {
		_result.setUserChoice(userChoice);
	}

	/**
	* Returns the correct of this result.
	*
	* @return the correct of this result
	*/
	public java.lang.String getCorrect() {
		return _result.getCorrect();
	}

	/**
	* Sets the correct of this result.
	*
	* @param correct the correct of this result
	*/
	public void setCorrect(java.lang.String correct) {
		_result.setCorrect(correct);
	}

	/**
	* Returns the score of this result.
	*
	* @return the score of this result
	*/
	public int getScore() {
		return _result.getScore();
	}

	/**
	* Sets the score of this result.
	*
	* @param score the score of this result
	*/
	public void setScore(int score) {
		_result.setScore(score);
	}

	public boolean isNew() {
		return _result.isNew();
	}

	public void setNew(boolean n) {
		_result.setNew(n);
	}

	public boolean isCachedModel() {
		return _result.isCachedModel();
	}

	public void setCachedModel(boolean cachedModel) {
		_result.setCachedModel(cachedModel);
	}

	public boolean isEscapedModel() {
		return _result.isEscapedModel();
	}

	public java.io.Serializable getPrimaryKeyObj() {
		return _result.getPrimaryKeyObj();
	}

	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_result.setPrimaryKeyObj(primaryKeyObj);
	}

	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _result.getExpandoBridge();
	}

	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_result.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new ResultWrapper((Result)_result.clone());
	}

	public int compareTo(com.swt.mto.thithu.model.Result result) {
		return _result.compareTo(result);
	}

	@Override
	public int hashCode() {
		return _result.hashCode();
	}

	public com.liferay.portal.model.CacheModel<com.swt.mto.thithu.model.Result> toCacheModel() {
		return _result.toCacheModel();
	}

	public com.swt.mto.thithu.model.Result toEscapedModel() {
		return new ResultWrapper(_result.toEscapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _result.toString();
	}

	public java.lang.String toXmlString() {
		return _result.toXmlString();
	}

	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_result.persist();
	}

	/**
	 * @deprecated Renamed to {@link #getWrappedModel}
	 */
	public Result getWrappedResult() {
		return _result;
	}

	public Result getWrappedModel() {
		return _result;
	}

	public void resetOriginalValues() {
		_result.resetOriginalValues();
	}

	private Result _result;
}